// 引用用户模版数据
const User = require('../models/user.js');
const userController = {
    showUser: async function(req,res,next){
        try{
            let userData = await User.all()
            console.log('success!!!')
            console.log(userData)
            res.json({
                code: 200,
                message: "操作成功",
                data: userData
            })
        }catch(e){
            console.log('error!!!')
            res.json({ code: 0, message: "操作失败", data: e })
        }
    },
}

module.exports = userController;
